<%-- 
    Document   : opnemen
    Created on : 11-apr-2009, 19:27:13
    Author     : frankkie
--%>

<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">

<html>
  <head>
    <link rel="stylesheet" type="text/css" href="bank.css" />
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <title>Lucky Bank - Opnenemen</title>
    <%
          boolean alleenAlsPinGoed = true;
          if (alleenAlsPinGoed) {
            if (session.getAttribute("pincodeGoed") == null || !session.getAttribute("pincodeGoed").equals("ja")) {
              //Is NIET goed...
              response.sendRedirect("index.jsp");
            }
          }
          %>
    <script type="text/javascript">
      function boe(){
        location.href="opnemenAnder.jsp";
        window.location = "opnemenAnder.jsp";
      }

      function g(b){
        //location.href="opnemenWilBon.jsp?bedrag=" + b;
        //window.location = "opnemenWilBon.jsp?bedrag=" + b;
        location.href="opnemenKnopCheck.jsp?bedrag=" + b;
        window.location = "opnemenKnopCheck.jsp?bedrag="+b;
      }
    </script>
    <%
    if (pin.Database.antiRechtsklik){out.println(pin.Header.rechtsKlikBeveiliging);}
    %>
  </head>
  <body>
    <table width="100%" border="0">
       <!-- Logo (=plaatje + Tekst) //-->
          <table border="0" width="100%"><tr>
              <td width="130"><img border="1" src="ThaLogo.jpg" alt="plaatje">
              <td><h1>Lucky Bank</h1>
              <td>&nbsp;<td align="right">
              <applet code="Applet" archive="prj4Applet.jar" height="127" width="350">
              </applet>
          </tr></table>
          <!--<br />//-->
      <!--</td></tr></table>//-->
      <!-- Einde Logo //-->
    <h1>Opnemen</h1>
    <a href="menu.jsp">Terug</a> | <a href="opnemenAnder.jsp">Ander Bedrag</a>
    <br />
    <%
    if (request.getParameter("a") != null) {
            //Er is iets mis
            if (request.getParameter("a").equals("S")){
              double saldo = pin.Saldo.kijk((String)session.getAttribute("banknummer"),(String)session.getAttribute("rekeningnummer"));
          //out.println("Uw Saldo bedraagt:\n&euro;" + saldo + "0");
              out.println("Saldo te laag<br />(saldo: &euro;" + saldo + "0)");
            }
            if (request.getParameter("a").equals("V")){
              out.println("Niet deelbaar door 5");
            }
            if (request.getParameter("a").equals("F")){
              out.println("Geen correct getal");
            }
            if (request.getParameter("a").equals("L")){
              out.println("Bedrag te Laag");
            }
            out.println("<br />");
          }
    %>
    <br />
    <table width="90%" align="center">
      <tr><td align="left"><button class="opneemKnop" onclick="g(5)">&euro;5</button><td>&nbsp;<td align="right"><button class="opneemKnop" onclick="g(10)">&euro;10</button></tr>
      <tr><td colspan="3">&nbsp;</tr>
      <tr><td align="left"><button class="opneemKnop" onclick="g(20)">&euro;20</button><td>&nbsp;<td align="right"><button class="opneemKnop" onclick="g(50)">&euro;50</button></tr>
      <tr><td colspan="3">&nbsp;</tr>
      <tr><td align="left"><button class="opneemKnop" onclick="g(100)">&euro;100</button><td>&nbsp;<td align="right"><button class="opneemKnop" onclick="g(200)">&euro;200</button></tr>
      <tr><td colspan="3">&nbsp;</tr>
      <tr><td align="left"><button class="opneemKnop" onclick="g(500)">&euro;500</button><td>&nbsp;<td align="right"><button class="opneemKnop" onclick="boe()">Ander Bedrag</button></tr>
      <tr><td colspan="3">&nbsp;</tr>
    </table>
  </body>
</html>
